package cn.edu.gcu.lost.sys.entity;

import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Lists;

public class Role extends BaseEntity{

	private static final long serialVersionUID = 1L;

	private String name; 	// 角色名称
	private String useable; 		//是否是可用
	private String ename;
	@JsonIgnore
	private User user;		// 根据用户ID查询角色列表
	private List<Menu> menuList = Lists.newArrayList(); // 拥有菜单列表
	
	public Role() {
		super();
	}
	
	public Role(User user) {
		this.user = user;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUseable() {
		return useable;
	}
	public void setUseable(String useable) {
		this.useable = useable;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public List<Menu> getMenuList() {
		return menuList;
	}
	public void setMenuList(List<Menu> menuList) {
		this.menuList = menuList;
	}

	public String getEname() {
		return ename;
	}

	public void setEname(String ename) {
		this.ename = ename;
	}

	@Override
	public String toString() {
		return "Role [name=" + name + ", useable=" + useable + ", ename=" + ename + ", user=" + user + ", menuList="
				+ menuList + "]";
	}
	
	
}
